//Town script for town 27: Crystal mine

begintownscript;

variables;

body;

beginstate INIT_STATE;
	set_crime_tolerance(3);

	set_name(6,"Commander Ningal");
	
	set_flag(26,3,0);
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
	
	if (get_ran(1,0,100) < 6)
		text_bubble_on_char(6,"Strange creatures");
	if (get_ran(1,0,100) < 6)
		text_bubble_on_char(6,"Down in the mine");
		
break;

beginstate 10;
	message_dialog("Among other things, you find a small note. It has been put here recently, you think. It doesn't look very old or anything. On one side small letters are written:","_He who seeks the one, let him go to the triangle of stones, near where our biggest enemy is._");
	set_flag(26,1,1);
break;

beginstate 11;
if (get_flag(26,0) == 0) {
		message_dialog("When you try to walk down into the mine, the guards who guard the entrance stop you. _Sorry, fellas, can't enter it._ You stumble back","");
		block_entry(1);
		end();
		}
	if (get_flag(26,3) == 1)
			end();
		message_dialog("You walk into the mine, but the guards stop you. You quickly tell them what Commander Ningal said. They appear less hostile and grant you entry.","");
		set_flag(26,3,1);
break;

beginstate 12;
if (get_flag(26,4) == 1) {
		message_dialog("It's still best not to go down there.","");
		block_entry(1);
		end();
		}
	message_dialog("There is a slope down here. A very cold wind comes from down the slope. You'd better not go in. God knows what you'll find there.","");
	set_flag(26,4,1);
	block_entry(1);
break;

beginstate 13;
if (get_flag(26,5) == 1)
		end();
	message_dialog("You enter a cave. At a curve to the left of the entrance, you think you can see a sort of crystal pillar. This may well be some sort of a crystal mine.","");
	set_flag(26,5,1);
break;

beginstate 14;
if (get_flag(120,0) == 1) {
		message_dialog("You open the entrydoor of the mine, and look straight into the eyes of two surprised soldiers. They immediately take you by your arms and walk you down the entrance, into the light, where they throw you in the grass.","Before they turn around they yell at you not to do that a second time, or they'll lock you up. It's clear they were quite bewildered by your sudden move.");
		set_flag(120,0,0);
		move_to_new_town(26,13,28);
		}
break;

beginstate 15;
break;

beginstate 16;
if (get_flag(26,0) == 1)
		end();
	message_dialog("This is not the time to start fooling around. You must get out of this place, and tell Mayor Ruth of Voughton what happened.","");
	block_entry(1);
break;

beginstate 17;
	message_dialog("You know that in that direction there is nothing for you to find. Just concentrate on what you have to do, and don't go to places where you know you can't help.","");
	block_entry(1);
break;